package com.sunxd.vue.infrastructure.config;

import com.sunxd.vue.infrastructure.interceptors.LoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author sun.xd
 * @description: description
 * @date 2024/4/2 16:58
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry
                .addInterceptor(new LoginInterceptor())
//                .addPathPatterns("/**")
                .addPathPatterns("/auth/checkTest")
                .excludePathPatterns("/","/auth/**","/css/**","/fonts/**","/images/**","/js/**");
    }
}
